/* 全局样式 */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f8fb;
    margin: 0;
    padding: 0;
    color: #222;
    min-height: 100vh;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1746a2;
    --danger: #dc3545;
    --success: #22c55e;
    --bg: #f4f8fb;
    --card: #fff;
    --border: #e5e7eb;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --radius: 10px;
    --transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

/* 容器 */
.container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 标题 */
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #007bff;
    color: white;
}

td {
    background-color: #fafafa;
}

/* 表格悬停效果 */
tr:hover {
    background-color: #f1f1f1;
}

/* 按钮样式 */
button {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 4px;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 模态框样式 */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#inventoryModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1010;
    width: 400px;
}

#inventoryModal form {
    display: flex;
    flex-direction: column;
}

#inventoryModal input {
    margin-bottom: 10px;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#inventoryModal button[type="submit"],
#inventoryModal button[type="button"] {
    margin-top: 10px;
    padding: 10px;
    font-size: 14px;
    background-color: #28a745;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#inventoryModal button[type="button"] {
    background-color: #dc3545;
}

/* 表单按钮的悬停效果 */
#inventoryModal button[type="submit"]:hover,
#inventoryModal button[type="button"]:hover {
    background-color: #218838;
}

#inventoryModal button[type="button"]:hover {
    background-color: #c82333;
}

/* 关闭按钮样式 */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

/* 页面居中 */
#inventory-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 20px;
}